package dbms;

import expression.ExpressionException;

public abstract class RowCondition {

	private Table table;
	private int y;

	public boolean isGood(Table in, int y) throws DBException, ExpressionException {
		this.table = in;
		this.y = y;
		return isGood(y);
	}

	protected abstract boolean isGood(int y) throws DBException, ExpressionException;
	
	protected Cell<?> getField(String colName) throws DBException {
		return table.getColumn(colName).getCell(y);
	}

}
